<template>
  <div class="container1" ref="home" id="home">
    <a id="top"></a>
    <div class="welcome">
      <h1>WELCOME TO SQUAD</h1>
      <h2>WE ARE TEAM OF TALENTED DESIGNERS MAKING WEBSITES WITH BOOTSTRAP</h2>
      <div class="goDown" @click="goDown">
          <span class="iconfont">&#xe6d5;</span>
      </div>
    </div>
  </div>
</template>

<script>
import Header from "../Header";
export default {
  name: "Home",
  data() {
    return {
      height: 0,
    };
  },
  components: { Header },
  mounted() {
    this.height = this.$refs.home.scrollHeight;
  },
  methods:{
    goDown(){
      window.scrollTo({
        top:this.height -66,
        behavior:'smooth'
      })
    }
  }
};
</script>

<style lang="less" scoped>
.container1 {
  width: 100%;
  height: 100vh;
  background: linear-gradient(rgba(55, 142, 181, 0.5), rgba(55, 142, 181, 0.2)),
    url(./img/hero-bg.jpg) top center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  .welcome {
    font-family: "Raleway", sans-serif;
    position: absolute;
    width: 100%;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    h1 {
      font-size: 64px;
    }
    h2 {
      font-size: 20px;
    }
    .goDown {
      display: inline-block;
      margin-top: 50px;
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: 2px solid #fff;
      line-height: 64px;
      overflow: hidden;
      transition: line-height 0.5s;
      cursor: pointer;
  
        span {
          color: #fff;
          font-size: 36px;
      }
      &:hover {
        line-height: 74px;
        background: rgba(255, 255, 255, 0.15);
      }
    }
  }
}
</style>